<html>
<head><meta charset="utf-8"><title>could not compile `ra_hir_def` · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/could.20not.20compile.20.60ra_hir_def.60.html">could not compile `ra_hir_def`</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="184238165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/could%20not%20compile%20%60ra_hir_def%60/near/184238165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Adeynack <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/could.20not.20compile.20.60ra_hir_def.60.html#184238165">(Dec 26 2019 at 01:19)</a>:</h4>
<p>Failing to build <strong>rust-analyzer</strong> (<a href="https://github.com/rust-analyzer/rust-analyzer" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer">https://github.com/rust-analyzer/rust-analyzer</a>)</p>
<p>Revision: <code>97f01396</code> (just git-pull-ed)</p>
<p>VSCode:<br>
Version: 1.41.1<br>
Commit: <a href="https://github.com/rust-lang/rust/commit/26076a4de974ead31f97692a0d32f90d735645c0" target="_blank" title="https://github.com/rust-lang/rust/commit/26076a4de974ead31f97692a0d32f90d735645c0">26076a4de974ead31f97692a0d32f90d735645c0</a><br>
Date: 2019-12-18T14:57:51.166Z<br>
Electron: 6.1.5<br>
Chrome: 76.0.3809.146<br>
Node.js: 12.4.0<br>
V8: 7.6.303.31-electron.0<br>
OS: Darwin x64 19.2.0</p>
<p>Build command: <code>cargo xtask install</code></p>
<p>Output (tail):</p>
<div class="codehilite"><pre><span></span>error[E0658]: use of unstable library feature &#39;mem_take&#39;
  --&gt; crates/ra_hir_def/src/body.rs:69:41
   |
69 | ...                   ast_id_map: mem::take(&amp;mut self.ast_id_map),
   |                                   ^^^^^^^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/61129

error[E0658]: use of unstable library feature &#39;mem_take&#39;
  --&gt; crates/ra_hir_def/src/body.rs:90:27
   |
90 |         self.ast_id_map = mem::take(&amp;mut mark.ast_id_map);
   |                           ^^^^^^^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/61129

error[E0658]: use of unstable library feature &#39;inner_deref&#39;: newly added
   --&gt; crates/ra_hir_def/src/path.rs:146:26
    |
146 |         self.type_anchor.as_deref()
    |                          ^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/50264

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0658`.
error: could not compile `ra_hir_def`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `ra_lsp_server v0.1.0 (/Users/adeynack/src/gh/rust-analyzer/rust-analyzer/crates/ra_lsp_server)`, intermediate artifacts can be found at `/Users/adeynack/src/gh/rust-analyzer/rust-analyzer/target`

Caused by:
  build failed

WARNING: at least rust 1.40.0 is required to compile rust-analyzer

Error: install server

Caused by:
    `cargo install --path crates/ra_lsp_server --locked --force` exited with exit code: 101
</pre></div>



<a name="184244030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/could%20not%20compile%20%60ra_hir_def%60/near/184244030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mikail Bagishov <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/could.20not.20compile.20.60ra_hir_def.60.html#184244030">(Dec 26 2019 at 04:55)</a>:</h4>
<p>I think you should update Rust toolchain to latest stable at least</p>



<a name="184284880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/could%20not%20compile%20%60ra_hir_def%60/near/184284880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/could.20not.20compile.20.60ra_hir_def.60.html#184284880">(Dec 26 2019 at 21:51)</a>:</h4>
<p>yup:</p>
<blockquote>
<p>WARNING: at least rust 1.40.0 is required to compile rust-analyzer</p>
</blockquote>



<a name="184389954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/could%20not%20compile%20%60ra_hir_def%60/near/184389954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Adeynack <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/could.20not.20compile.20.60ra_hir_def.60.html#184389954">(Dec 28 2019 at 20:33)</a>:</h4>
<p>I think I read too fast and read that VSCode 1.40.0 min was required. #doh</p>



<a name="184390821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/could%20not%20compile%20%60ra_hir_def%60/near/184390821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Adeynack <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/could.20not.20compile.20.60ra_hir_def.60.html#184390821">(Dec 28 2019 at 20:56)</a>:</h4>
<p>It worked like a charm. Thanks for your help!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>